//
//  AnimalCell.m
//  TodayComment
//
//  Created by 张吉阳 on 15/9/21.
//  Copyright (c) 2015年 xianrenmoshi. All rights reserved.
//

#import "AnimalCell.h"
#import "FxDownload.h"
@implementation AnimalCell

- (void)initCell
{
    [super initCell];
    
    RegisterNotify(NofifyNewsIcon, @selector(downloadIcon:));
}


- (void)dealloc
{
    RemoveNofify;
}

- (void)setCellData:(CommentInfo *)info
{
    [super setCellData:info];
    
    _titleLabel.text = info.commentContent;
    _replyCount.text = info.commentCount;

    [[FxDownload alloc]setCommentIcon:info imageView:_imageView];
    
}
- (void)downloadIcon:(NSNotification *)notification
{
    NSDictionary *dict = [notification object];
    NewsInfo *info = [dict objectForKey:@"info"];
    
    if ([info.ID isEqualToString:self.cellInfo.ID]) {
        UIImage *image = [dict objectForKey:@"data"];
        _imageView.image = image;
    }
}


@end
